package com.musicstore.biz.impl;

import java.util.List;

import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.musicstore.biz.AlbumBiz;
import com.musicstore.dao.AlbumDao;
import com.musicstore.entity.AlbumEntity;
@Service("albumBiz")
public class AlbumBizImpl implements AlbumBiz {
	@Autowired
	private AlbumDao albumDao;
	
	public void setAlbumDao(AlbumDao albumDao) {
		this.albumDao = albumDao;
	}
	public List<AlbumEntity> getAlbumTitle(String title,int startIndex, int pageSize) {
		// TODO Auto-generated method stub
		System.out.println(startIndex+" "+pageSize);
		return albumDao.getAlbumTitle(title,startIndex,pageSize);
	}
	public List<AlbumEntity> getAlbumPage(int gid, String title,
			int startIndex, int pageSize) {
		System.out.println("GID="+gid);
		return albumDao.getAlbumPage(gid, title, startIndex, pageSize);
	}
	public int getRowsCount(int gid, String title) {
		// TODO Auto-generated method stub
		return albumDao.getRowsCount(gid, title);
	}
	public AlbumEntity getById(int id) {
		System.out.println("进来AlbumEntity getById了么");
		// TODO Auto-generated method stub
		return albumDao.getById(id);
	}
	public void updateAlbmu(AlbumEntity album) {
		// TODO Auto-generated method stub
		albumDao.updateAlbmu(album);
	}
	public void addAlbum(AlbumEntity album) {
		// TODO Auto-generated method stub
		albumDao.addAlbum(album);
	}

}
